<template>
  <div class="film">
    <nav>
      <div @click="gotocity">
        <span>城市</span>
        <span class="iconfont icon-arrow-down"></span>
      </div>
      <ul>
        <router-link to="/film/newplaying" tag="li" active-class="active"
          >热映</router-link
        >
        <router-link to="/film/comingsoon" tag="li" active-class="active"
          >待映</router-link
        >        
      </ul>
      <span class="iconfont icon-search"></span>
    </nav>
    <div class="nav-height"></div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // 默认不吸顶
      fixed: false,
    }
  },
  methods: {
    gotocity() {
      this.$router.push('/city')
    }
  }
};
</script>
 
<style scoped lang="scss">
.film {
  margin-top: 1.1rem;
  nav {
    position: fixed;
    width: 100%;
    top: 1.1rem;
    background-color: #fff;
    z-index: 66;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.01rem solid #ccc;
    padding: 0 .3rem;
    div {
      width: 20%;
      font-size: .3rem;
      color: gray;
    }
    ul {
    height: 0.9rem;
    width: 60%;
    display: flex;
    justify-content: space-evenly;
    font-size: 0.3rem;
    color: rgb(78, 76, 76);
    font-weight: 900;
    li {
      line-height: 0.9rem;
      text-align: center;
      width: 1rem;
      cursor: pointer;
      &.active {
        color: red;
        border-bottom: 0.04rem solid red;
      }
    }
    }
    span {
      width: 20%;
      text-align: right;
  
    }
  }
  .nav-height {
    height: .9rem;
  }
}
.icon-search {
  font-size: .4rem;
  color: red;
  font-weight: 900;
}
.icon-arrow-down {
  font-size: .2rem;
  margin-left: .1rem;
}
</style>